<script setup>
import SafeTopContainer from '@/components/SafeTopContainer/SafeTopContainer.vue'
import { navigateBack } from '@/utils'

const reportUrl = ref('https://portal.chekuangplus.com/Report/bb77b54266124575b0e9ab344e2f7fa9')
const orderUuid = ref('')
// const fullReportUrl = computed(() =>
//   `https://ucar.mycrab.cn/report?reportUrl=${reportUrl.value}`,
// )
onLoad((options) => {
  console.log('onLoad', options)
  if(options){
    orderUuid.value = options.orderUuid
  }
  // if (options.orderUuid) {
  //   orderService.proxyGetReport({ orderUuid: options.orderUuid }).then((res) => {
  //   }).catch((err) => {
  //     console.log(err)
  //     reportUrl.value = err
  //   })
  // }
})
</script>

<template>
  <safe-top-container bg-color="#ffff" :show-bg-color="true" :fixed="true">
    <wd-navbar left-arrow custom-class="!bg-transparent" :bordered="false" title="报告详情" @click-left="navigateBack" />
  </safe-top-container>
  <view class="container">
    <web-view class="report-content" :src="`https://ucar.mycrab.cn/report?orderId=${orderUuid}`" />
  </view>
</template>

<style lang="scss" scoped>
.container {
  width: 100%;
  height: 100vh;
}
.report-content {
  width: 100%;
  height: 100%;
}
</style>
